package com.tair.utils
{
    public class StatusUtil
    {
        public function StatusUtil()
        {
        }
        
        public static function parseStatus(input:String):String
        {
            var result:String = input;
            result = parseAt(result);
            result = parseUrl(result);
            
            return result;
        }
        
        public static function parseAt(input:String):String
        {
            return input;
        }
        
        public static const URL_PATTERN:RegExp = new RegExp("((?:http|ftp)://)([a-z0-9_-]+\.[a-z0-9_-]+)(\.[a-z0-9_-]*)", "ig");
        public static function parseUrl(input:String):String
        {
            var result:String = input.replace(URL_PATTERN, "<a href='$1$2$3'>$1$2$3</a>");
            return result;
        }
        
        public static function parseSBCcase(input:String):String
        {
            return input;
        }
        
        
    }
}